home *** CD-ROM | disk | FTP | other *** search
/ Freelog 121 / FreelogMagazineJuilletAout2014-No121.iso / Outils / Adobe-Air / adobe-air_13.exe / [0] / setup.swf / scripts / mx / effects / Effect.as next >
Text File  |  2014-03-27  |  23KB  |  747 lines

  1. package mx.effects
  2. {
  3.    import flash.events.Event;
  4.    import flash.events.EventDispatcher;
  5.    import flash.utils.getQualifiedClassName;
  6.    import mx.core.IFlexDisplayObject;
  7.    import mx.core.mx_internal;
  8.    import mx.effects.effectClasses.AddRemoveEffectTargetFilter;
  9.    import mx.effects.effectClasses.HideShowEffectTargetFilter;
  10.    import mx.effects.effectClasses.PropertyChanges;
  11.    import mx.events.EffectEvent;
  12.    import mx.managers.LayoutManager;
  13.    
  14.    use namespace mx_internal;
  15.    
  16.    public class Effect extends EventDispatcher implements IEffect
  17.    {
  18.       
  19.       mx_internal static const VERSION:String = "3.0.0.0";
  20.        
  21.       
  22.       private var _perElementOffset:Number = 0;
  23.       
  24.       private var _hideFocusRing:Boolean = false;
  25.       
  26.       private var _customFilter:EffectTargetFilter;
  27.       
  28.       public var repeatCount:int = 1;
  29.       
  30.       public var suspendBackgroundProcessing:Boolean = false;
  31.       
  32.       public var startDelay:int = 0;
  33.       
  34.       private var _relevantProperties:Array;
  35.       
  36.       private var _callValidateNow:Boolean = false;
  37.       
  38.       mx_internal var applyActualDimensions:Boolean = true;
  39.       
  40.       private var _filter:String;
  41.       
  42.       private var _triggerEvent:Event;
  43.       
  44.       private var _effectTargetHost:IEffectTargetHost;
  45.       
  46.       mx_internal var durationExplicitlySet:Boolean = false;
  47.       
  48.       public var repeatDelay:int = 0;
  49.       
  50.       private var _targets:Array;
  51.       
  52.       mx_internal var propertyChangesArray:Array;
  53.       
  54.       mx_internal var filterObject:EffectTargetFilter;
  55.       
  56.       protected var endValuesCaptured:Boolean = false;
  57.       
  58.       public var instanceClass:Class;
  59.       
  60.       private var _duration:Number = 500;
  61.       
  62.       private var isPaused:Boolean = false;
  63.       
  64.       private var _relevantStyles:Array;
  65.       
  66.       private var _instances:Array;
  67.       
  68.       public function Effect(param1:Object = null)
  69.       {
  70.          _instances = [];
  71.          instanceClass = IEffectInstance;
  72.          _relevantStyles = [];
  73.          _targets = [];
  74.          super();
  75.          this.target = param1;
  76.       }
  77.       
  78.       private static function mergeArrays(param1:Array, param2:Array) : Array
  79.       {
  80.          var _loc3_:int = 0;
  81.          var _loc4_:Boolean = false;
  82.          var _loc5_:int = 0;
  83.          if(param2)
  84.          {
  85.             _loc3_ = 0;
  86.             while(_loc3_ < param2.length)
  87.             {
  88.                _loc4_ = true;
  89.                _loc5_ = 0;
  90.                while(_loc5_ < param1.length)
  91.                {
  92.                   if(param1[_loc5_] == param2[_loc3_])
  93.                   {
  94.                      _loc4_ = false;
  95.                      break;
  96.                   }
  97.                   _loc5_++;
  98.                }
  99.                if(_loc4_)
  100.                {
  101.                   param1.push(param2[_loc3_]);
  102.                }
  103.                _loc3_++;
  104.             }
  105.          }
  106.          return param1;
  107.       }
  108.       
  109.       private static function stripUnchangedValues(param1:Array) : Array
  110.       {
  111.          var _loc3_:* = null;
  112.          var _loc2_:int = 0;
  113.          while(_loc2_ < param1.length)
  114.          {
  115.             for(_loc3_ in param1[_loc2_].start)
  116.             {
  117.                if(param1[_loc2_].start[_loc3_] == param1[_loc2_].end[_loc3_] || typeof param1[_loc2_].start[_loc3_] == "number" && typeof param1[_loc2_].end[_loc3_] == "number" && isNaN(param1[_loc2_].start[_loc3_]) && isNaN(param1[_loc2_].end[_loc3_]))
  118.                {
  119.                   delete param1[_loc2_].start[_loc3_];
  120.                   delete param1[_loc2_].end[_loc3_];
  121.                }
  122.             }
  123.             _loc2_++;
  124.          }
  125.          return param1;
  126.       }
  127.       
  128.       public function get targets() : Array
  129.       {
  130.          return _targets;
  131.       }
  132.       
  133.       public function set targets(param1:Array) : void
  134.       {
  135.          var _loc2_:int = param1.length;
  136.          var _loc3_:int = _loc2_ - 1;
  137.          while(_loc3_ > 0)
  138.          {
  139.             if(param1[_loc3_] == null)
  140.             {
  141.                param1.splice(_loc3_,1);
  142.             }
  143.             _loc3_--;
  144.          }
  145.          _targets = param1;
  146.       }
  147.       
  148.       public function set hideFocusRing(param1:Boolean) : void
  149.       {
  150.          _hideFocusRing = param1;
  151.       }
  152.       
  153.       public function get hideFocusRing() : Boolean
  154.       {
  155.          return _hideFocusRing;
  156.       }
  157.       
  158.       public function stop() : void
  159.       {
  160.          var _loc3_:IEffectInstance = null;
  161.          var _loc1_:int = _instances.length;
  162.          var _loc2_:int = _loc1_;
  163.          while(_loc2_ >= 0)
  164.          {
  165.             _loc3_ = IEffectInstance(_instances[_loc2_]);
  166.             if(_loc3_)
  167.             {
  168.                _loc3_.stop();
  169.             }
  170.             _loc2_--;
  171.          }
  172.       }
  173.       
  174.       public function captureStartValues() : void
  175.       {
  176.          var _loc1_:int = 0;
  177.          var _loc2_:int = 0;
  178.          if(targets.length > 0)
  179.          {
  180.             propertyChangesArray = [];
  181.             _callValidateNow = true;
  182.             _loc1_ = targets.length;
  183.             _loc2_ = 0;
  184.             while(_loc2_ < _loc1_)
  185.             {
  186.                mx_internal::propertyChangesArray.push(new PropertyChanges(targets[_loc2_]));
  187.                _loc2_++;
  188.             }
  189.             propertyChangesArray = captureValues(mx_internal::propertyChangesArray,true);
  190.          }
  191.          endValuesCaptured = false;
  192.       }
  193.       
  194.       mx_internal function captureValues(param1:Array, param2:Boolean) : Array
  195.       {
  196.          var _loc4_:Object = null;
  197.          var _loc5_:Object = null;
  198.          var _loc6_:int = 0;
  199.          var _loc7_:int = 0;
  200.          var _loc8_:int = 0;
  201.          var _loc9_:int = 0;
  202.          var _loc3_:Array = !mx_internal::filterObject ? relevantProperties : mergeArrays(relevantProperties,mx_internal::filterObject.filterProperties);
  203.          if(_loc3_ && _loc3_.length > 0)
  204.          {
  205.             _loc6_ = param1.length;
  206.             _loc7_ = 0;
  207.             while(_loc7_ < _loc6_)
  208.             {
  209.                _loc5_ = param1[_loc7_].target;
  210.                _loc4_ = !!param2 ? param1[_loc7_].start : param1[_loc7_].end;
  211.                _loc8_ = _loc3_.length;
  212.                _loc9_ = 0;
  213.                while(_loc9_ < _loc8_)
  214.                {
  215.                   _loc4_[_loc3_[_loc9_]] = getValueFromTarget(_loc5_,_loc3_[_loc9_]);
  216.                   _loc9_++;
  217.                }
  218.                _loc7_++;
  219.             }
  220.          }
  221.          var _loc10_:Array;
  222.          if((_loc10_ = !mx_internal::filterObject ? relevantStyles : mergeArrays(relevantStyles,mx_internal::filterObject.filterStyles)) && _loc10_.length > 0)
  223.          {
  224.             _loc6_ = param1.length;
  225.             _loc7_ = 0;
  226.             while(_loc7_ < _loc6_)
  227.             {
  228.                _loc5_ = param1[_loc7_].target;
  229.                _loc4_ = !!param2 ? param1[_loc7_].start : param1[_loc7_].end;
  230.                _loc8_ = _loc10_.length;
  231.                _loc9_ = 0;
  232.                while(_loc9_ < _loc8_)
  233.                {
  234.                   _loc4_[_loc10_[_loc9_]] = _loc5_.getStyle(_loc10_[_loc9_]);
  235.                   _loc9_++;
  236.                }
  237.                _loc7_++;
  238.             }
  239.          }
  240.          return param1;
  241.       }
  242.       
  243.       protected function getValueFromTarget(param1:Object, param2:String) : *
  244.       {
  245.          if(param2 in param1)
  246.          {
  247.             return param1[param2];
  248.          }
  249.          return undefined;
  250.       }
  251.       
  252.       public function set target(param1:Object) : void
  253.       {
  254.          _targets.splice(0);
  255.          if(param1)
  256.          {
  257.             _targets[0] = param1;
  258.          }
  259.       }
  260.       
  261.       public function get className() : String
  262.       {
  263.          var _loc1_:String = getQualifiedClassName(this);
  264.          var _loc2_:int = _loc1_.indexOf("::");
  265.          if(_loc2_ != -1)
  266.          {
  267.             _loc1_ = _loc1_.substr(_loc2_ + 2);
  268.          }
  269.          return _loc1_;
  270.       }
  271.       
  272.       public function set perElementOffset(param1:Number) : void
  273.       {
  274.          _perElementOffset = param1;
  275.       }
  276.       
  277.       public function resume() : void
  278.       {
  279.          var _loc1_:int = 0;
  280.          var _loc2_:int = 0;
  281.          if(isPlaying && isPaused)
  282.          {
  283.             isPaused = false;
  284.             _loc1_ = _instances.length;
  285.             _loc2_ = 0;
  286.             while(_loc2_ < _loc1_)
  287.             {
  288.                IEffectInstance(_instances[_loc2_]).resume();
  289.                _loc2_++;
  290.             }
  291.          }
  292.       }
  293.       
  294.       public function set duration(param1:Number) : void
  295.       {
  296.          durationExplicitlySet = true;
  297.          _duration = param1;
  298.       }
  299.       
  300.       public function play(param1:Array = null, param2:Boolean = false) : Array
  301.       {
  302.          var _loc6_:IEffectInstance = null;
  303.          if(param1 == null && mx_internal::propertyChangesArray != null)
  304.          {
  305.             if(_callValidateNow)
  306.             {
  307.                LayoutManager.getInstance().validateNow();
  308.             }
  309.             if(!endValuesCaptured)
  310.             {
  311.                propertyChangesArray = captureValues(mx_internal::propertyChangesArray,false);
  312.             }
  313.             propertyChangesArray = stripUnchangedValues(mx_internal::propertyChangesArray);
  314.             applyStartValues(mx_internal::propertyChangesArray,this.targets);
  315.          }
  316.          var _loc3_:Array = createInstances(param1);
  317.          var _loc4_:int = _loc3_.length;
  318.          var _loc5_:int = 0;
  319.          while(_loc5_ < _loc4_)
  320.          {
  321.             _loc6_ = IEffectInstance(_loc3_[_loc5_]);
  322.             Object(_loc6_).playReversed = param2;
  323.             _loc6_.startEffect();
  324.             _loc5_++;
  325.          }
  326.          return _loc3_;
  327.       }
  328.       
  329.       public function captureEndValues() : void
  330.       {
  331.          propertyChangesArray = captureValues(mx_internal::propertyChangesArray,false);
  332.          endValuesCaptured = true;
  333.       }
  334.       
  335.       protected function filterInstance(param1:Array, param2:Object) : Boolean
  336.       {
  337.          if(mx_internal::filterObject)
  338.          {
  339.             return mx_internal::filterObject.filterInstance(param1,effectTargetHost,param2);
  340.          }
  341.          return true;
  342.       }
  343.       
  344.       public function get customFilter() : EffectTargetFilter
  345.       {
  346.          return _customFilter;
  347.       }
  348.       
  349.       public function get effectTargetHost() : IEffectTargetHost
  350.       {
  351.          return _effectTargetHost;
  352.       }
  353.       
  354.       public function set relevantProperties(param1:Array) : void
  355.       {
  356.          _relevantProperties = param1;
  357.       }
  358.       
  359.       public function captureMoreStartValues(param1:Array) : void
  360.       {
  361.          var _loc2_:Array = null;
  362.          var _loc3_:int = 0;
  363.          if(param1.length > 0)
  364.          {
  365.             _loc2_ = [];
  366.             _loc3_ = 0;
  367.             while(_loc3_ < param1.length)
  368.             {
  369.                _loc2_.push(new PropertyChanges(param1[_loc3_]));
  370.                _loc3_++;
  371.             }
  372.             _loc2_ = captureValues(_loc2_,true);
  373.             propertyChangesArray = mx_internal::propertyChangesArray.concat(_loc2_);
  374.          }
  375.       }
  376.       
  377.       public function deleteInstance(param1:IEffectInstance) : void
  378.       {
  379.          EventDispatcher(param1).removeEventListener(EffectEvent.EFFECT_START,effectStartHandler);
  380.          EventDispatcher(param1).removeEventListener(EffectEvent.EFFECT_END,effectEndHandler);
  381.          var _loc2_:int = _instances.length;
  382.          var _loc3_:int = 0;
  383.          while(_loc3_ < _loc2_)
  384.          {
  385.             if(_instances[_loc3_] === param1)
  386.             {
  387.                _instances.splice(_loc3_,1);
  388.             }
  389.             _loc3_++;
  390.          }
  391.       }
  392.       
  393.       public function get filter() : String
  394.       {
  395.          return _filter;
  396.       }
  397.       
  398.       public function set triggerEvent(param1:Event) : void
  399.       {
  400.          _triggerEvent = param1;
  401.       }
  402.       
  403.       public function get target() : Object
  404.       {
  405.          if(_targets.length > 0)
  406.          {
  407.             return _targets[0];
  408.          }
  409.          return null;
  410.       }
  411.       
  412.       public function get duration() : Number
  413.       {
  414.          return _duration;
  415.       }
  416.       
  417.       public function set customFilter(param1:EffectTargetFilter) : void
  418.       {
  419.          _customFilter = param1;
  420.          filterObject = param1;
  421.       }
  422.       
  423.       public function get perElementOffset() : Number
  424.       {
  425.          return _perElementOffset;
  426.       }
  427.       
  428.       public function set effectTargetHost(param1:IEffectTargetHost) : void
  429.       {
  430.          _effectTargetHost = param1;
  431.       }
  432.       
  433.       public function get isPlaying() : Boolean
  434.       {
  435.          return _instances && _instances.length > 0;
  436.       }
  437.       
  438.       protected function effectEndHandler(param1:EffectEvent) : void
  439.       {
  440.          var _loc2_:IEffectInstance = IEffectInstance(param1.effectInstance);
  441.          deleteInstance(_loc2_);
  442.          dispatchEvent(param1);
  443.       }
  444.       
  445.       public function get relevantProperties() : Array
  446.       {
  447.          if(_relevantProperties)
  448.          {
  449.             return _relevantProperties;
  450.          }
  451.          return getAffectedProperties();
  452.       }
  453.       
  454.       public function createInstance(param1:Object = null) : IEffectInstance
  455.       {
  456.          var _loc6_:int = 0;
  457.          var _loc7_:int = 0;
  458.          if(!param1)
  459.          {
  460.             param1 = this.target;
  461.          }
  462.          var _loc2_:IEffectInstance = null;
  463.          var _loc3_:PropertyChanges = null;
  464.          var _loc4_:Boolean = true;
  465.          var _loc5_:Boolean = false;
  466.          if(mx_internal::propertyChangesArray)
  467.          {
  468.             _loc5_ = true;
  469.             _loc4_ = filterInstance(mx_internal::propertyChangesArray,param1);
  470.          }
  471.          if(_loc4_)
  472.          {
  473.             _loc2_ = IEffectInstance(new instanceClass(param1));
  474.             initInstance(_loc2_);
  475.             if(_loc5_)
  476.             {
  477.                _loc6_ = mx_internal::propertyChangesArray.length;
  478.                _loc7_ = 0;
  479.                while(_loc7_ < _loc6_)
  480.                {
  481.                   if(mx_internal::propertyChangesArray[_loc7_].target == param1)
  482.                   {
  483.                      _loc2_.propertyChanges = mx_internal::propertyChangesArray[_loc7_];
  484.                   }
  485.                   _loc7_++;
  486.                }
  487.             }
  488.             EventDispatcher(_loc2_).addEventListener(EffectEvent.EFFECT_START,effectStartHandler);
  489.             EventDispatcher(_loc2_).addEventListener(EffectEvent.EFFECT_END,effectEndHandler);
  490.             _instances.push(_loc2_);
  491.             if(triggerEvent)
  492.             {
  493.                _loc2_.initEffect(triggerEvent);
  494.             }
  495.          }
  496.          return _loc2_;
  497.       }
  498.       
  499.       protected function effectStartHandler(param1:EffectEvent) : void
  500.       {
  501.          dispatchEvent(param1);
  502.       }
  503.       
  504.       public function getAffectedProperties() : Array
  505.       {
  506.          return [];
  507.       }
  508.       
  509.       public function set relevantStyles(param1:Array) : void
  510.       {
  511.          _relevantStyles = param1;
  512.       }
  513.       
  514.       public function get triggerEvent() : Event
  515.       {
  516.          return _triggerEvent;
  517.       }
  518.       
  519.       protected function applyValueToTarget(param1:Object, param2:String, param3:*, param4:Object) : void
  520.       {
  521.          var target:Object = param1;
  522.          var property:String = param2;
  523.          var value:* = param3;
  524.          var props:Object = param4;
  525.          if(property in target)
  526.          {
  527.             try
  528.             {
  529.                if(mx_internal::applyActualDimensions && target is IFlexDisplayObject && property == "height")
  530.                {
  531.                   target.setActualSize(target.width,value);
  532.                }
  533.                else if(mx_internal::applyActualDimensions && target is IFlexDisplayObject && property == "width")
  534.                {
  535.                   target.setActualSize(value,target.height);
  536.                }
  537.                else
  538.                {
  539.                   target[property] = value;
  540.                }
  541.             }
  542.             catch(e:Error)
  543.             {
  544.             }
  545.          }
  546.       }
  547.       
  548.       protected function initInstance(param1:IEffectInstance) : void
  549.       {
  550.          param1.duration = duration;
  551.          Object(param1).durationExplicitlySet = mx_internal::durationExplicitlySet;
  552.          param1.effect = this;
  553.          param1.effectTargetHost = effectTargetHost;
  554.          param1.hideFocusRing = hideFocusRing;
  555.          param1.repeatCount = repeatCount;
  556.          param1.repeatDelay = repeatDelay;
  557.          param1.startDelay = startDelay;
  558.          param1.suspendBackgroundProcessing = suspendBackgroundProcessing;
  559.       }
  560.       
  561.       mx_internal function applyStartValues(param1:Array, param2:Array) : void
  562.       {
  563.          var _loc6_:int = 0;
  564.          var _loc7_:int = 0;
  565.          var _loc8_:Object = null;
  566.          var _loc9_:Boolean = false;
  567.          var _loc3_:Array = relevantProperties;
  568.          var _loc4_:int = param1.length;
  569.          var _loc5_:int = 0;
  570.          while(_loc5_ < _loc4_)
  571.          {
  572.             _loc8_ = param1[_loc5_].target;
  573.             _loc9_ = false;
  574.             _loc6_ = param2.length;
  575.             _loc7_ = 0;
  576.             while(_loc7_ < _loc6_)
  577.             {
  578.                if(param2[_loc7_] == _loc8_)
  579.                {
  580.                   _loc9_ = filterInstance(param1,_loc8_);
  581.                   break;
  582.                }
  583.                _loc7_++;
  584.             }
  585.             if(_loc9_)
  586.             {
  587.                _loc6_ = _loc3_.length;
  588.                _loc7_ = 0;
  589.                while(_loc7_ < _loc6_)
  590.                {
  591.                   if(_loc3_[_loc7_] in param1[_loc5_].start && _loc3_[_loc7_] in _loc8_)
  592.                   {
  593.                      applyValueToTarget(_loc8_,_loc3_[_loc7_],param1[_loc5_].start[_loc3_[_loc7_]],param1[_loc5_].start);
  594.                   }
  595.                   _loc7_++;
  596.                }
  597.                _loc6_ = relevantStyles.length;
  598.                _loc7_ = 0;
  599.                while(_loc7_ < _loc6_)
  600.                {
  601.                   if(relevantStyles[_loc7_] in param1[_loc5_].start)
  602.                   {
  603.                      _loc8_.setStyle(relevantStyles[_loc7_],param1[_loc5_].start[relevantStyles[_loc7_]]);
  604.                   }
  605.                   _loc7_++;
  606.                }
  607.             }
  608.             _loc5_++;
  609.          }
  610.       }
  611.       
  612.       public function end(param1:IEffectInstance = null) : void
  613.       {
  614.          var _loc2_:int = 0;
  615.          var _loc3_:int = 0;
  616.          var _loc4_:IEffectInstance = null;
  617.          if(param1)
  618.          {
  619.             param1.end();
  620.          }
  621.          else
  622.          {
  623.             _loc2_ = _instances.length;
  624.             _loc3_ = _loc2_;
  625.             while(_loc3_ >= 0)
  626.             {
  627.                if(_loc4_ = IEffectInstance(_instances[_loc3_]))
  628.                {
  629.                   _loc4_.end();
  630.                }
  631.                _loc3_--;
  632.             }
  633.          }
  634.       }
  635.       
  636.       public function get relevantStyles() : Array
  637.       {
  638.          return _relevantStyles;
  639.       }
  640.       
  641.       public function createInstances(param1:Array = null) : Array
  642.       {
  643.          var _loc6_:IEffectInstance = null;
  644.          if(!param1)
  645.          {
  646.             param1 = this.targets;
  647.          }
  648.          var _loc2_:Array = [];
  649.          var _loc3_:int = param1.length;
  650.          var _loc4_:Number = 0;
  651.          var _loc5_:int = 0;
  652.          while(_loc5_ < _loc3_)
  653.          {
  654.             if(_loc6_ = createInstance(param1[_loc5_]))
  655.             {
  656.                _loc6_.startDelay += _loc4_;
  657.                _loc4_ += perElementOffset;
  658.                _loc2_.push(_loc6_);
  659.             }
  660.             _loc5_++;
  661.          }
  662.          triggerEvent = null;
  663.          return _loc2_;
  664.       }
  665.       
  666.       public function pause() : void
  667.       {
  668.          var _loc1_:int = 0;
  669.          var _loc2_:int = 0;
  670.          if(isPlaying && !isPaused)
  671.          {
  672.             isPaused = true;
  673.             _loc1_ = _instances.length;
  674.             _loc2_ = 0;
  675.             while(_loc2_ < _loc1_)
  676.             {
  677.                IEffectInstance(_instances[_loc2_]).pause();
  678.                _loc2_++;
  679.             }
  680.          }
  681.       }
  682.       
  683.       public function set filter(param1:String) : void
  684.       {
  685.          if(!customFilter)
  686.          {
  687.             _filter = param1;
  688.             switch(param1)
  689.             {
  690.                case "add":
  691.                case "remove":
  692.                   filterObject = new AddRemoveEffectTargetFilter();
  693.                   AddRemoveEffectTargetFilter(mx_internal::filterObject).add = param1 == "add";
  694.                   break;
  695.                case "hide":
  696.                case "show":
  697.                   filterObject = new HideShowEffectTargetFilter();
  698.                   HideShowEffectTargetFilter(mx_internal::filterObject).show = param1 == "show";
  699.                   break;
  700.                case "move":
  701.                   filterObject = new EffectTargetFilter();
  702.                   mx_internal::filterObject.filterProperties = ["x","y"];
  703.                   break;
  704.                case "resize":
  705.                   filterObject = new EffectTargetFilter();
  706.                   mx_internal::filterObject.filterProperties = ["width","height"];
  707.                   break;
  708.                case "addItem":
  709.                   filterObject = new EffectTargetFilter();
  710.                   mx_internal::filterObject.requiredSemantics = {"added":true};
  711.                   break;
  712.                case "removeItem":
  713.                   filterObject = new EffectTargetFilter();
  714.                   mx_internal::filterObject.requiredSemantics = {"removed":true};
  715.                   break;
  716.                case "replacedItem":
  717.                   filterObject = new EffectTargetFilter();
  718.                   mx_internal::filterObject.requiredSemantics = {"replaced":true};
  719.                   break;
  720.                case "replacementItem":
  721.                   filterObject = new EffectTargetFilter();
  722.                   mx_internal::filterObject.requiredSemantics = {"replacement":true};
  723.                   break;
  724.                default:
  725.                   filterObject = null;
  726.             }
  727.          }
  728.       }
  729.       
  730.       public function reverse() : void
  731.       {
  732.          var _loc1_:int = 0;
  733.          var _loc2_:int = 0;
  734.          if(isPlaying)
  735.          {
  736.             _loc1_ = _instances.length;
  737.             _loc2_ = 0;
  738.             while(_loc2_ < _loc1_)
  739.             {
  740.                IEffectInstance(_instances[_loc2_]).reverse();
  741.                _loc2_++;
  742.             }
  743.          }
  744.       }
  745.    }
  746. }
  747.